package gradation.impl;

import gradation.AbstractGradation;

import java.util.Arrays;


public class WeightedAverageGradation extends AbstractGradation {

	@Override
	public int[] processPixel(int[] pixel, int x, int y) {
		int val = (int) (0.3 * pixel[0] + 0.59 * pixel[1] + 0.11 * pixel[2]);
		Arrays.fill(pixel, val);
		return pixel;
	}

}
